<template>
  <!-- 远程 -->
  <select-base
    v-model="vValue"
    :remote="true"
    :isInitData="false"
    :filterable="true"
    v-bind="attrs"
    @itemEvent="itemEvent"
  ></select-base>
</template>

<script setup>
import { vModelValue } from '@/utils/hooks.js';
import SelectBase from './SelectBase.vue';
const attrs = useAttrs();
const props = defineProps({
  modelValue: {
    type: [String, Array, Number],
  },
});
const emits = defineEmits(['update:modelValue', 'itemEvent']);
const { newValue: key } = vModelValue(props, emits);
let vValue = ref(key);

function itemEvent(scope) {
  emits('itemEvent', scope);
}
</script>
